﻿var vm = this.lookupViewModel();
if (self.containsFocus) {
    var JLRC, CJLR;

    JLRC = parseInt(newValue.split('|')[0]);
    CJLR = 100 - JLRC;

    var html = "Suggested Company Sharing Ratio: JLRC " + JLRC + "%,   CJLR " + CJLR + "%";
    ref.companySharingRatioTips.show();
    ref.companySharingRatioTips.setHtml(html);


    var _store3 = ref.datagrid3.getStore();

    Ext.each(_store3.data.items, function (item) {
        if (item.get('Company') == 'JLRC') {
            item.set('CompanySharingRatio', JLRC);
        } else if (item.get('Company') == 'CJLR') {
            item.set('CompanySharingRatio', CJLR);
        }
    });
}